<layout name="layout"/>
<script>

function showDialog(id){
$("#roleModal input[name='uid']").val(id);
var modal = UIkit.modal("#roleModal");
 modal.show();
}

</script>
<p>
<!-- Button trigger modal -->
<button type="button" class="uk-button uk-button-success" data-uk-modal="{target:'#myModal',center:true}">
{$Think.lang.add_new}
</button>

</p>

          <div class="uk-overflow-container">
            <table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">
	<thead>
		<th>#</th>		<th>{$Think.lang.account}</th>			<th>{$Think.lang.email}</th><th>{$Think.lang.belongs}</th>		<th>{$Think.lang.add_time}</th>
		<th>{$Think.lang.status}</th>		<th>--</th>
	</thead>
	<tbody>
		<volist name="list" id="vo">
		<tr>
			<td><a href="__CONTROLLER__/details/{$vo.id}">{$vo.id}</a></td><td>{$vo.account}</td>
		<td>{$vo.email}</td>
			<td>{$vo.id|admin_to_role}</td>
			<td>{$vo.create_time}</td>
			<td>{$vo.status|displayIcon}</td>
			<td>
			<a data-toggle="modal" href="javascript:void(0)" onclick="showDialog('{$vo.id}')">{$Think.lang.assign}</a>&nbsp;|&nbsp;
				<a href="javascript:void(0)" onclick="confirmDelete('__CONTROLLER__/deleteHandle/{$vo.id}')">
					<i class="uk-icon-trash"></i>
				</a>
			</td>
		</tr>
		</volist>
	</tbody>
</table>
</div>
{$page}

<!-- Modal -->
<div class="uk-modal" id="myModal">
 <form id="validate_form" class="uk-form"  method="post" action="__CONTROLLER__/addHandle">
    <div class="uk-modal-dialog"> <a class="uk-modal-close uk-close"></a>
        <div class="uk-modal-header">{$Think.lang.add_new}</div>

<table class="uk-table">
<tr><td>{$Think.lang.account}</td><td>

<input type="text" name="account" class="form-control"  required style="height:30px;" />

</td></tr>
  
<tr><td>{$Think.lang.pwd}</td><td>

<input type="password" name="new_pwd" class="form-control" minlength="6"  required style="height:30px;" />

</td></tr>
<tr><td>{$Think.lang.email}</td><td>

<input type="email" name="email" class="form-control"  required style="height:30px;"  />
</td></tr>
<tr><td>{$Think.lang.remark}</td><td>

<textarea type="text" name="remark" class="form-control" 
 style="height:100px;"   ></textarea>
</td></tr>
</table >

        <div class="uk-modal-footer uk-text-right">
		<button class="uk-button uk-button-danger" type="submit">{$Think.lang.save}</button>
		</div>
    </div>
			   </form> 
</div>



<!--分配角色-->
<div class="uk-modal" id="roleModal">
<form   method="post" class="uk-form" action="__CONTROLLER__/assignRole">
    <div class="uk-modal-dialog"> <a class="uk-modal-close uk-close"></a>
        <div class="uk-modal-header">{$Think.lang.assign}</div>

<input type="hidden" name="uid"/>

    <label>{$Thinl.lang.admin_group}</label>
<select name="group_id" class="form-control">
<volist name=":getObjectList('authGroup','status=1')" id="vo">
<option value="{$vo.id}">{$vo.title}</option>
</volist>
</select>

        <div class="uk-modal-footer uk-text-right">
		<button class="uk-button uk-button-danger" type="submit">保存</button>
		</div>

  </form>
     <em>{$Think.lang.member_notice}</em>
</div> 

</div>

 













